package com.pri.labs.junk;


import com.pri.labs.client.structure.ActionHandler;
import com.smartgwt.client.widgets.menu.Menu;
import com.smartgwt.client.widgets.menu.MenuItem;
import com.smartgwt.client.widgets.menu.events.MenuItemClickEvent;

public class LayoutPanelMenu extends Menu
{
 public LayoutPanelMenu( final ActionHandler<Void> lsn )
 {
  setWidth(150);

  MenuItem rowsItem = new MenuItem();
  rowsItem.setTitle("Split to rows");
  rowsItem.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler()
  {

   @Override
   public void onClick(MenuItemClickEvent event)
   {
    lsn.actionPerformed(Actions.SPLIT2ROW.name(), (Void)null);
   }
  });
  
  MenuItem colsItem = new MenuItem();
  colsItem.setTitle("Split to columns");
  colsItem.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler()
  {

   @Override
   public void onClick(MenuItemClickEvent event)
   {
    lsn.actionPerformed(Actions.SPLIT2COL.name(), (Void)null);
   }
  });

  MenuItem widthItem = new MenuItem();
  widthItem.setTitle("Set width");
  widthItem.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler()
  {

   @Override
   public void onClick(MenuItemClickEvent event)
   {
    lsn.actionPerformed(Actions.SET_W.name(), (Void)null);
   }

  }
  );
  
  
  MenuItem heightItem = new MenuItem();
  heightItem.setTitle("Set height");
  heightItem.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler()
  {

   @Override
   public void onClick(MenuItemClickEvent event)
   {
    lsn.actionPerformed(Actions.SET_H.name(), (Void)null);
   }

  }
  );
  
  MenuItem removeItem = new MenuItem();
  removeItem.setTitle("Remove");
  removeItem.addClickHandler(new com.smartgwt.client.widgets.menu.events.ClickHandler()
  {

   @Override
   public void onClick(MenuItemClickEvent event)
   {
    lsn.actionPerformed(Actions.REMOVE.name(), (Void)null);
   }

  }
  );


  setItems( colsItem, rowsItem, widthItem, heightItem, removeItem );

 }
}
